As an example, here is the input for the example diagram on page :
\begin{rail} decl : 'def' identifier '=' ( expression + ';' ) | 'type' identifier '=' type ; \end{rail}